import { axios } from '@/utils/request'

export function shopPurchaseinfoList(query) {
  return axios({
    url: '/yjsh/purchaseinfo/shop/shopPurchaseinfoList',
    method: 'get',
    params: query
  })
}

export function addObj(obj) {
  return axios({
    url: '/yjsh/purchaseinfo/savePurchaseinfo',
    method: 'post',
    data: obj
  })
}

export function getObj(id) {
  return axios({
    url: '/yjsh/purchaseinfo/' + id,
    method: 'get'
  })
}

export function delObj(id) {
  return axios({
    url: '/yjsh/purchaseinfo/' + id,
    method: 'delete'
  }) 
}

export function putObj(obj) {
  return axios({
    url: '/yjsh/purchaseinfo/shop/shopPurchaseDetail/' + obj,
    method: 'get'
  })
}

export function merchantinfosupply(query) {  //供应商
  return axios({
    url: '/yjsh/merchantinfo/supply/page',
    mmethod: 'get',
    params: query
  })
}
export function shopgoodscategory(obj) {  //商品类目
  return axios({
    url: '/yjsh/shopgoodscategory/tree',
    method: 'post',
    data: obj
  })
}

export function platformgoodsinfo(query) {  //平台商品
  return axios({
    url: '/yjsh/platformgoodsinfo/page',
    method: 'get',
    params: query
  })
}


export function shopGoodsInfoList(query) {  //根据门店商品类目获取平台商品
  return axios({
    url: '/yjsh/purchaseinfo/shopGoodsInfoList',
    method: 'get',
    params: query
  })
}


export function shopGoodsInfoPage(query) {  //2021-1-25修改 根据门店商品类目获取平台商品
  return axios({
    url: '/yjsh/purchaseinfo/shopGoodsInfoPage',
    method: 'get',
    params: query
  })
}


export function platformgoodscategory(obj) {  //平台商品类目
  return axios({
    url: '/yjsh/platformgoodscategory/tree',
    method: 'get',
    params: obj
  })
}


export function shopPurchaseDetail(purchaseInfoId) {  //门店采购单详情
  return axios({
    url: '/yjsh/purchaseinfo/shop/shopPurchaseDetail/' + purchaseInfoId,
    method: 'get',
  })
}